<script setup lang="ts">
  import { ref } from 'vue'
  import CustomTitleBar from './components/CustomTitleBar.vue'

  const isFullscreen = ref(false)
  // function toogleFullscreen() {
  //   window.electron.ipcRenderer.invoke('set-fullscreen')
  //   isFullscreen.value = !isFullscreen.value
  // }
</script>

<template>
  <div class="flex flex-col h-full">
    <CustomTitleBar v-if="!isFullscreen" class="flex-shrink-0"></CustomTitleBar>
    <div class="flex-1 relative">
      <!-- <el-button class="absolute right-0 z-10" @click="toogleFullscreen">点击全屏</el-button>
      <iframe
        class="no-scroll-iframe"
        :class="isFullscreen ? 'w-100vw h-100vh' : 'w-100vw h-full'"
        scrolling="no"
        src="http://192.168.0.119:8080/tms/"
      ></iframe> -->
    </div>
  </div>
</template>

<style scoped>
  .no-scroll-iframe {
    border: none; /* 有些浏览器需要加上 */
    scrollbar-width: none; /* Firefox 隐藏滚动条 */
  }

  .no-scroll-iframe::-webkit-scrollbar {
    display: none; /* Chrome 隐藏滚动条 */
  }
</style>
